/**
 * Created by zx1984 2018/3/6
 * https://github.com/zx1984
 */
'use strict';

// 模拟数据
var mockData=new Array();
function createMockData () {

  var id = $('#trip_id').val()

    $.ajax({
        type: 'POST',
        async:false,
        url: "http://www.lvyou.com/index/Trip/trip_price",
        data: {
            id:id
        },
        success: function(data) {
            var data =JSON.parse(data)
            // console.log(data)
            mockData=data
            // for(var i=0;i<data.length;i++){
            //     mockData.push(data[i])
            // }

            // console.log(mockData)
        }
    });
  return mockData
}

function randNum (max) {
  return Math.round(Math.random() * max);
}

function fd (n) {

  n = n.toString();
  return n[1] ? n : '0' + n;
}
